<template>
  <div class="">
    <el-card v-if="contentView">
      <el-row>
        <el-col :span="12">
          <Searchmodule :placeholder="placeholder" @seacherKey="seacher"></Searchmodule>
        </el-col>
        <el-col :span="12" style="text-align: right;">
          <div>
            <el-button    type="primary" icon="el-icon-plus" @click="operationView(0)">添加</el-button>
          </div>
        </el-col>
      </el-row>
      <!--表格-->
      <el-table :row-style="{height: '10px'}" :cell-style="{padding:'0px'}" :data="tableData" border v-loading="loading">
        <!--  <el-table-column type="index" label="序号" v-if="false" align="center" width="50">
          </el-table-column> -->
        <el-table-column prop="roleName" label="角色组名称" align="center" >
        </el-table-column>
        <el-table-column prop="roleMeber" label="角色组成员" align="center" >
        </el-table-column>
        <el-table-column  label="操作"   align="center" >
          <template  slot-scope="scope">
            <div  >
              <el-button type="text" icon="el-icon-edit" @click="operationView(1, scope.row)">编辑</el-button>
              <el-button type="text" :loading="scope.row.loading" icon="el-icon-delete" @click="operationView(2, scope.row)">删除</el-button>
            </div>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination style="text-align: center;"
                     :disabled="loading"
                     @size-change="handleSizeChange"
                     @current-change="handleCurrentChange"
                     :current-page="queryInfo.pageNo"
                     :page-sizes="[25,50]"
                     :page-size="queryInfo.pageSize"
                     layout="total, sizes, prev, pager, next, jumper"
                     :total="total">
      </el-pagination>
    </el-card>
    <submitForm v-else :subData="subData" @closeView="closeView" @refresh="refreshTable"></submitForm>
  </div>
</template>


<script>
  export default {
    data(){
      return{
        contentView:true,
        loading:false,
        placeholder:'',
        tableData:[],
        total:0,
        queryInfo:{
          pageNo:1,
          pageSize:25
        },
        subData:{}
      }
    },
    methods: {
      seacher(){},
      handleSizeChange(){},
      handleCurrentChange(){},
      closeView(){},
      refreshTable(){}
    }
  }

</script>
<style scoped>

</style>
